package com.bileetacrm;

import java.util.ArrayList;
import java.util.List;

import com.bileetacrm.SimpleGestureFilter.SimpleGestureListener;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.view.animation.Animation;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;
import android.widget.Toast;

public class BileetaNewLeadActiviy extends Fragment {

	private static final String TAG = null;
	private static final View v = null;
	Spinner spinnersalesunit, spinnerleadacowner, spinnerleadsource,
			spinnerleadstatus, spinnerleadsrating, spinnerleadsindustry;


	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View view = inflater.inflate(R.layout.bileeta_new_lead_activiy,
				container, false);

		/*
		 * dbHelper = new MySqlLiteHelper(getActivity()); database =
		 * dbHelper.getWritableDatabase();
		 */
		
		String [] values = 
	        {"Sales Unit-1","Sales Unit-2","Sales Unit-3","Sales Unit-4","Sales Unit-5","Sales Unit-6",};
	    Spinner spinner = (Spinner) view.findViewById(R.id.spinnersalesunit);
	    ArrayAdapter<String> LTRadapter = new ArrayAdapter<String>(this.getActivity(), android.R.layout.simple_spinner_item, values);
	    LTRadapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);
	    spinner.setAdapter(LTRadapter);
	    
	    String [] valuesb = 
	        {"Account Owner-1","Account Owner-2","Account Owner-3","Account Owner-4","Account Owner-5","Account Owner-6",};
	    Spinner spinnerb = (Spinner) view.findViewById(R.id.spinnerleadacowner);
	    ArrayAdapter<String> LTRadapterb = new ArrayAdapter<String>(this.getActivity(), android.R.layout.simple_spinner_item, valuesb);
	    LTRadapterb.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);
	    spinnerb.setAdapter(LTRadapterb);
		
	    String [] valuesc = 
	        {"Lead Source-1","Lead Source-2","Lead Source-3","Lead Source-4","Lead Source-5","Lead Source-6",};
	    Spinner spinnerc = (Spinner) view.findViewById(R.id.spinnerleadsource);
	    ArrayAdapter<String> LTRadapterc = new ArrayAdapter<String>(this.getActivity(), android.R.layout.simple_spinner_item, valuesc);
	    LTRadapterc.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);
	    spinnerc.setAdapter(LTRadapterc);
	    
	    String [] valuesd = 
	        {"Lead Status-1","Lead Status-2","Lead Status-3","Lead Status-4","Lead Status-5","Lead Status-6",};
	    Spinner spinnerd = (Spinner) view.findViewById(R.id.spinnerleadstatus);
	    ArrayAdapter<String> LTRadapterd = new ArrayAdapter<String>(this.getActivity(), android.R.layout.simple_spinner_item, valuesd);
	    LTRadapterd.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);
	    spinnerd.setAdapter(LTRadapterd);
		
		Button buttonAddInquiry = (Button) view
				.findViewById(R.id.menu_add_inquiry);
		buttonAddInquiry.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent myIntent = new Intent(v.getContext(),
						BileetaAddNewInquery.class);
				startActivityForResult(myIntent, 0);

			}
		});

		Button buttonAddEvent = (Button) view.findViewById(R.id.menu_add_event);
		buttonAddEvent.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent myIntent = new Intent(v.getContext(),
						BileetaAddNewEvent.class);
				startActivityForResult(myIntent, 0);

			}
		});

		Button buttonAddtionalInfo = (Button) view
				.findViewById(R.id.menu_additional_info);
		buttonAddtionalInfo.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent myIntent = new Intent(v.getContext(),
						BileetaAddLeadAdditionalInfo.class);
				startActivityForResult(myIntent, 0);

			}
		});

		Button buttonAddContact = (Button) view
				.findViewById(R.id.menu_add_to_contacts);
		buttonAddContact.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent myIntent = new Intent(v.getContext(),
						BileetaAddContactInformation.class);
				startActivityForResult(myIntent, 0);

			}
		});
		
		Button displayDetailsView = (Button) view
				.findViewById(R.id.displayDetailsView);
		displayDetailsView.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent myIntent = new Intent(v.getContext(),
						BileetaLeedDetailsView.class);
				startActivityForResult(myIntent, 0);

			}
		});
	

		return view;
	}
	
	  //Your created method
    public void onBackPressed()
    {
    	
        //Handle any cleanup you don't always want done in the normal lifecycle
    }
}
